package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"ruoyi-vue-pro-go/api/common"
	"ruoyi-vue-pro-go/internal/model/entity"
)

type GetOneReq struct {
	g.Meta `path:"/admin-api/system/dict-type/get" method:"get" tags:"Dict" permission:"system:dict:query" summary:"Get dict type by id"`
	Id     uint `v:"required" dc:"dict type id"`
}
type GetOneRes struct {
	*entity.SystemDictType `dc:"dict type"`
}

type GetListReq struct {
	g.Meta `path:"/admin-api/system/dict-type/simple-list" method:"get" tags:"Dict type" summary:"Get dict type list"`
}
type GetListRes struct {
	List []*entity.SystemDictType `json:"list" dc:"dict type list"`
}

type GetPageReq struct {
	g.Meta `path:"/admin-api/system/dict-type/page" method:"get" tags:"dict type Page" summary:"Get dict type pages"`
	*common.CommonPageReq
	Name   string `json:"name" dc:"name"`
	Type   string `json:"type" dc:"type"`
	Status int    `dc:"status"`
}
type GetPageRes struct {
	List []*entity.SystemDictType `json:"list" dc:"dict type pages"`
	*common.CommonPageRes
}

type CreateReq struct {
	g.Meta  `path:"/admin-api/system/dict-type/create" method:"post" tags:"Dict type" permission:"system:dict:create" summary:"Create dict type"`
	Name    string `v:"required" dc:"字典类型名称"`
	Type    string `v:"required" dc:"字典类型"`
	Status  int    `v:"required|in:0,1" dc:"字典类型状态"`
	Remark  string `dc:"备注"`
	Creator string `dc:"创建人"`
	Updater string `dc:"更新人"`
}
type CreateRes struct{}

type DeleteReq struct {
	g.Meta `path:"/admin-api/system/dict-type/delete" method:"delete" tags:"Dict type" permission:"system:dict:delete" summary:"Delete dict type"`
	Id     int64 `v:"required" dc:"dict type id"`
}
type DeleteRes struct{}

type DeleteListReq struct {
	g.Meta `path:"/admin-api/system/dict-type/delete-list" method:"delete" tags:"Dict type" permission:"system:dict:delete" summary:"Delete dict type list"`
	Ids    string `v:"required" dc:"dict type id list"`
}
type DeleteListRes struct{}

type UpdateReq struct {
	g.Meta  `path:"/admin-api/system/dict-type/update" method:"put" tags:"Dict" permission:"system:dict:update" summary:"Update type data"`
	Id      int64  `v:"required" dc:"dict type id"`
	Name    string `v:"required" dc:"字典类型名称"`
	Type    string `v:"required" dc:"字典类型"`
	Status  int    `v:"required|in:0,1" dc:"字典类型状态"`
	Remark  string `dc:"备注"`
	Creator string `dc:"创建人"`
	Updater string `dc:"更新人"`
}
type UpdateRes struct{}

type ExportExcelReq struct {
	g.Meta `path:"/admin-api/system/dict-type/export-excel" method:"get" tags:"Dict" permission:"system:dict:export" summary:"Export dict type excel"`
}
type ExportExcelRes struct {
	g.Meta `mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" type:"string" example:"<file content>"`
}
